package com.lemontree.spring3.day04;

import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by lemontree on 2017/7/27.
 */
public class SpringTest {

//    @Autowired
//    private Bean2 bean2;

    @Test
    public void test() {
        BeanFactory factory = new ClassPathXmlApplicationContext(
                "com/lemontree/spring3/day04/day04.xml");
        Bean2 bean2 = (Bean2) factory.getBean("bean2");
        bean2.say2();
    }
}
